Integrand size = 24, antiderivative size = 83 \[ \int (a+a \sin (e+f x)) (c-c \sin (e+f x))^3 \, dx=\frac {5}{8} a c^3 x+\frac {5 a c^3 \cos ^3(e+f x)}{12 f}+\frac {5 a c^3 \cos (e+f x) \sin (e+f x)}{8 f}+\frac {a \cos ^3(e+f x) \left (c^3-c^3 \sin (e+f x)\right )}{4 f} \]
5/8*a*c^3*x+5/12*a*c^3*cos(f*x+e)^3/f+5/8*a*c^3*cos(f*x+e)*sin(f*x+e)/f+1/ 4*a*cos(f*x+e)^3*(c^3-c^3*sin(f*x+e))/f
Time = 0.83 (sec) , antiderivative size = 54, normalized size of antiderivative = 0.65 \[ \int (a+a \sin (e+f x)) (c-c \sin (e+f x))^3 \, dx=\frac {a c^3 (60 f x+48 \cos (e+f x)+16 \cos (3 (e+f x))+24 \sin (2 (e+f x))-3 \sin (4 (e+f x)))}{96 f} \]
(a*c^3*(60*f*x + 48*Cos[e + f*x] + 16*Cos[3*(e + f*x)] + 24*Sin[2*(e + f*x )] - 3*Sin[4*(e + f*x)]))/(96*f)
Time = 0.43 (sec) , antiderivative size = 83, normalized size of antiderivative = 1.00, number of steps used = 9, number of rules used = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.375, Rules used = {3042, 3215, 3042, 3157, 3042, 3148, 3042, 3115, 24}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int (a \sin (e+f x)+a) (c-c \sin (e+f x))^3 \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int (a \sin (e+f x)+a) (c-c \sin (e+f x))^3dx\) |
\(\Big \downarrow \) 3215 |
\(\displaystyle a c \int \cos ^2(e+f x) (c-c \sin (e+f x))^2dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle a c \int \cos (e+f x)^2 (c-c \sin (e+f x))^2dx\) |
\(\Big \downarrow \) 3157 |
\(\displaystyle a c \left (\frac {5}{4} c \int \cos ^2(e+f x) (c-c \sin (e+f x))dx+\frac {\cos ^3(e+f x) \left (c^2-c^2 \sin (e+f x)\right )}{4 f}\right )\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle a c \left (\frac {5}{4} c \int \cos (e+f x)^2 (c-c \sin (e+f x))dx+\frac {\cos ^3(e+f x) \left (c^2-c^2 \sin (e+f x)\right )}{4 f}\right )\) |
\(\Big \downarrow \) 3148 |
\(\displaystyle a c \left (\frac {5}{4} c \left (c \int \cos ^2(e+f x)dx+\frac {c \cos ^3(e+f x)}{3 f}\right )+\frac {\cos ^3(e+f x) \left (c^2-c^2 \sin (e+f x)\right )}{4 f}\right )\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle a c \left (\frac {5}{4} c \left (c \int \sin \left (e+f x+\frac {\pi }{2}\right )^2dx+\frac {c \cos ^3(e+f x)}{3 f}\right )+\frac {\cos ^3(e+f x) \left (c^2-c^2 \sin (e+f x)\right )}{4 f}\right )\) |
\(\Big \downarrow \) 3115 |
\(\displaystyle a c \left (\frac {5}{4} c \left (c \left (\frac {\int 1dx}{2}+\frac {\sin (e+f x) \cos (e+f x)}{2 f}\right )+\frac {c \cos ^3(e+f x)}{3 f}\right )+\frac {\cos ^3(e+f x) \left (c^2-c^2 \sin (e+f x)\right )}{4 f}\right )\) |
\(\Big \downarrow \) 24 |
\(\displaystyle a c \left (\frac {\cos ^3(e+f x) \left (c^2-c^2 \sin (e+f x)\right )}{4 f}+\frac {5}{4} c \left (\frac {c \cos ^3(e+f x)}{3 f}+c \left (\frac {\sin (e+f x) \cos (e+f x)}{2 f}+\frac {x}{2}\right )\right )\right )\) |
a*c*((Cos[e + f*x]^3*(c^2 - c^2*Sin[e + f*x]))/(4*f) + (5*c*((c*Cos[e + f* x]^3)/(3*f) + c*(x/2 + (Cos[e + f*x]*Sin[e + f*x])/(2*f))))/4)
3.3.28.3.1 Defintions of rubi rules used
Int[((b_.)*sin[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[(-b)*Cos[c + d* x]*((b*Sin[c + d*x])^(n - 1)/(d*n)), x] + Simp[b^2*((n - 1)/n) Int[(b*Sin [c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1] && IntegerQ[ 2*n]
Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x _)]), x_Symbol] :> Simp[(-b)*((g*Cos[e + f*x])^(p + 1)/(f*g*(p + 1))), x] + Simp[a Int[(g*Cos[e + f*x])^p, x], x] /; FreeQ[{a, b, e, f, g, p}, x] && (IntegerQ[2*p] || NeQ[a^2 - b^2, 0])
Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x _)])^(m_), x_Symbol] :> Simp[(-b)*(g*Cos[e + f*x])^(p + 1)*((a + b*Sin[e + f*x])^(m - 1)/(f*g*(m + p))), x] + Simp[a*((2*m + p - 1)/(m + p)) Int[(g* Cos[e + f*x])^p*(a + b*Sin[e + f*x])^(m - 1), x], x] /; FreeQ[{a, b, e, f, g, m, p}, x] && EqQ[a^2 - b^2, 0] && GtQ[m, 0] && NeQ[m + p, 0] && Integers Q[2*m, 2*p]
Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((c_) + (d_.)*sin[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Simp[a^m*c^m Int[Cos[e + f*x]^(2*m)*(c + d*Sin[e + f*x])^(n - m), x], x] /; FreeQ[{a, b, c, d, e, f, n}, x] && EqQ[ b*c + a*d, 0] && EqQ[a^2 - b^2, 0] && IntegerQ[m] && !(IntegerQ[n] && ((Lt Q[m, 0] && GtQ[n, 0]) || LtQ[0, n, m] || LtQ[m, n, 0]))
Time = 1.57 (sec) , antiderivative size = 57, normalized size of antiderivative = 0.69
method | result | size |
parallelrisch | \(\frac {a \,c^{3} \left (60 f x +48 \cos \left (f x +e \right )-3 \sin \left (4 f x +4 e \right )+16 \cos \left (3 f x +3 e \right )+24 \sin \left (2 f x +2 e \right )+64\right )}{96 f}\) | \(57\) |
risch | \(\frac {5 a \,c^{3} x}{8}+\frac {a \,c^{3} \cos \left (f x +e \right )}{2 f}-\frac {a \,c^{3} \sin \left (4 f x +4 e \right )}{32 f}+\frac {a \,c^{3} \cos \left (3 f x +3 e \right )}{6 f}+\frac {a \,c^{3} \sin \left (2 f x +2 e \right )}{4 f}\) | \(78\) |
derivativedivides | \(\frac {-a \,c^{3} \left (-\frac {\left (\sin ^{3}\left (f x +e \right )+\frac {3 \sin \left (f x +e \right )}{2}\right ) \cos \left (f x +e \right )}{4}+\frac {3 f x}{8}+\frac {3 e}{8}\right )-\frac {2 a \,c^{3} \left (2+\sin ^{2}\left (f x +e \right )\right ) \cos \left (f x +e \right )}{3}+2 a \,c^{3} \cos \left (f x +e \right )+a \,c^{3} \left (f x +e \right )}{f}\) | \(89\) |
default | \(\frac {-a \,c^{3} \left (-\frac {\left (\sin ^{3}\left (f x +e \right )+\frac {3 \sin \left (f x +e \right )}{2}\right ) \cos \left (f x +e \right )}{4}+\frac {3 f x}{8}+\frac {3 e}{8}\right )-\frac {2 a \,c^{3} \left (2+\sin ^{2}\left (f x +e \right )\right ) \cos \left (f x +e \right )}{3}+2 a \,c^{3} \cos \left (f x +e \right )+a \,c^{3} \left (f x +e \right )}{f}\) | \(89\) |
parts | \(a \,c^{3} x +\frac {2 a \,c^{3} \cos \left (f x +e \right )}{f}-\frac {2 a \,c^{3} \left (2+\sin ^{2}\left (f x +e \right )\right ) \cos \left (f x +e \right )}{3 f}-\frac {a \,c^{3} \left (-\frac {\left (\sin ^{3}\left (f x +e \right )+\frac {3 \sin \left (f x +e \right )}{2}\right ) \cos \left (f x +e \right )}{4}+\frac {3 f x}{8}+\frac {3 e}{8}\right )}{f}\) | \(90\) |
norman | \(\frac {\frac {4 a \,c^{3}}{3 f}+\frac {5 a \,c^{3} x}{8}+\frac {4 a \,c^{3} \left (\tan ^{6}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{f}+\frac {4 a \,c^{3} \left (\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{3 f}+\frac {4 a \,c^{3} \left (\tan ^{4}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{f}+\frac {3 a \,c^{3} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{4 f}+\frac {11 a \,c^{3} \left (\tan ^{3}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{4 f}-\frac {11 a \,c^{3} \left (\tan ^{5}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{4 f}-\frac {3 a \,c^{3} \left (\tan ^{7}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{4 f}+\frac {5 a \,c^{3} x \left (\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{2}+\frac {15 a \,c^{3} x \left (\tan ^{4}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{4}+\frac {5 a \,c^{3} x \left (\tan ^{6}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{2}+\frac {5 a \,c^{3} x \left (\tan ^{8}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{8}}{\left (1+\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )^{4}}\) | \(244\) |
Time = 0.27 (sec) , antiderivative size = 63, normalized size of antiderivative = 0.76 \[ \int (a+a \sin (e+f x)) (c-c \sin (e+f x))^3 \, dx=\frac {16 \, a c^{3} \cos \left (f x + e\right )^{3} + 15 \, a c^{3} f x - 3 \, {\left (2 \, a c^{3} \cos \left (f x + e\right )^{3} - 5 \, a c^{3} \cos \left (f x + e\right )\right )} \sin \left (f x + e\right )}{24 \, f} \]
1/24*(16*a*c^3*cos(f*x + e)^3 + 15*a*c^3*f*x - 3*(2*a*c^3*cos(f*x + e)^3 - 5*a*c^3*cos(f*x + e))*sin(f*x + e))/f
Leaf count of result is larger than twice the leaf count of optimal. 196 vs. \(2 (78) = 156\).
Time = 0.18 (sec) , antiderivative size = 196, normalized size of antiderivative = 2.36 \[ \int (a+a \sin (e+f x)) (c-c \sin (e+f x))^3 \, dx=\begin {cases} - \frac {3 a c^{3} x \sin ^{4}{\left (e + f x \right )}}{8} - \frac {3 a c^{3} x \sin ^{2}{\left (e + f x \right )} \cos ^{2}{\left (e + f x \right )}}{4} - \frac {3 a c^{3} x \cos ^{4}{\left (e + f x \right )}}{8} + a c^{3} x + \frac {5 a c^{3} \sin ^{3}{\left (e + f x \right )} \cos {\left (e + f x \right )}}{8 f} - \frac {2 a c^{3} \sin ^{2}{\left (e + f x \right )} \cos {\left (e + f x \right )}}{f} + \frac {3 a c^{3} \sin {\left (e + f x \right )} \cos ^{3}{\left (e + f x \right )}}{8 f} - \frac {4 a c^{3} \cos ^{3}{\left (e + f x \right )}}{3 f} + \frac {2 a c^{3} \cos {\left (e + f x \right )}}{f} & \text {for}\: f \neq 0 \\x \left (a \sin {\left (e \right )} + a\right ) \left (- c \sin {\left (e \right )} + c\right )^{3} & \text {otherwise} \end {cases} \]
Piecewise((-3*a*c**3*x*sin(e + f*x)**4/8 - 3*a*c**3*x*sin(e + f*x)**2*cos( e + f*x)**2/4 - 3*a*c**3*x*cos(e + f*x)**4/8 + a*c**3*x + 5*a*c**3*sin(e + f*x)**3*cos(e + f*x)/(8*f) - 2*a*c**3*sin(e + f*x)**2*cos(e + f*x)/f + 3* a*c**3*sin(e + f*x)*cos(e + f*x)**3/(8*f) - 4*a*c**3*cos(e + f*x)**3/(3*f) + 2*a*c**3*cos(e + f*x)/f, Ne(f, 0)), (x*(a*sin(e) + a)*(-c*sin(e) + c)** 3, True))
Time = 0.19 (sec) , antiderivative size = 86, normalized size of antiderivative = 1.04 \[ \int (a+a \sin (e+f x)) (c-c \sin (e+f x))^3 \, dx=\frac {64 \, {\left (\cos \left (f x + e\right )^{3} - 3 \, \cos \left (f x + e\right )\right )} a c^{3} - 3 \, {\left (12 \, f x + 12 \, e + \sin \left (4 \, f x + 4 \, e\right ) - 8 \, \sin \left (2 \, f x + 2 \, e\right )\right )} a c^{3} + 96 \, {\left (f x + e\right )} a c^{3} + 192 \, a c^{3} \cos \left (f x + e\right )}{96 \, f} \]
1/96*(64*(cos(f*x + e)^3 - 3*cos(f*x + e))*a*c^3 - 3*(12*f*x + 12*e + sin( 4*f*x + 4*e) - 8*sin(2*f*x + 2*e))*a*c^3 + 96*(f*x + e)*a*c^3 + 192*a*c^3* cos(f*x + e))/f
Time = 0.35 (sec) , antiderivative size = 77, normalized size of antiderivative = 0.93 \[ \int (a+a \sin (e+f x)) (c-c \sin (e+f x))^3 \, dx=\frac {5}{8} \, a c^{3} x + \frac {a c^{3} \cos \left (3 \, f x + 3 \, e\right )}{6 \, f} + \frac {a c^{3} \cos \left (f x + e\right )}{2 \, f} - \frac {a c^{3} \sin \left (4 \, f x + 4 \, e\right )}{32 \, f} + \frac {a c^{3} \sin \left (2 \, f x + 2 \, e\right )}{4 \, f} \]
5/8*a*c^3*x + 1/6*a*c^3*cos(3*f*x + 3*e)/f + 1/2*a*c^3*cos(f*x + e)/f - 1/ 32*a*c^3*sin(4*f*x + 4*e)/f + 1/4*a*c^3*sin(2*f*x + 2*e)/f
Time = 8.77 (sec) , antiderivative size = 250, normalized size of antiderivative = 3.01 \[ \int (a+a \sin (e+f x)) (c-c \sin (e+f x))^3 \, dx=\frac {5\,a\,c^3\,x}{8}-\frac {{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2\,\left (\frac {a\,c^3\,\left (15\,e+15\,f\,x\right )}{6}-\frac {a\,c^3\,\left (60\,e+60\,f\,x+32\right )}{24}\right )+{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^6\,\left (\frac {a\,c^3\,\left (15\,e+15\,f\,x\right )}{6}-\frac {a\,c^3\,\left (60\,e+60\,f\,x+96\right )}{24}\right )+{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^4\,\left (\frac {a\,c^3\,\left (15\,e+15\,f\,x\right )}{4}-\frac {a\,c^3\,\left (90\,e+90\,f\,x+96\right )}{24}\right )-\frac {3\,a\,c^3\,\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}{4}-\frac {11\,a\,c^3\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^3}{4}+\frac {11\,a\,c^3\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^5}{4}+\frac {3\,a\,c^3\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^7}{4}+\frac {a\,c^3\,\left (15\,e+15\,f\,x\right )}{24}-\frac {a\,c^3\,\left (15\,e+15\,f\,x+32\right )}{24}}{f\,{\left ({\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2+1\right )}^4} \]
(5*a*c^3*x)/8 - (tan(e/2 + (f*x)/2)^2*((a*c^3*(15*e + 15*f*x))/6 - (a*c^3* (60*e + 60*f*x + 32))/24) + tan(e/2 + (f*x)/2)^6*((a*c^3*(15*e + 15*f*x))/ 6 - (a*c^3*(60*e + 60*f*x + 96))/24) + tan(e/2 + (f*x)/2)^4*((a*c^3*(15*e + 15*f*x))/4 - (a*c^3*(90*e + 90*f*x + 96))/24) - (3*a*c^3*tan(e/2 + (f*x) /2))/4 - (11*a*c^3*tan(e/2 + (f*x)/2)^3)/4 + (11*a*c^3*tan(e/2 + (f*x)/2)^ 5)/4 + (3*a*c^3*tan(e/2 + (f*x)/2)^7)/4 + (a*c^3*(15*e + 15*f*x))/24 - (a* c^3*(15*e + 15*f*x + 32))/24)/(f*(tan(e/2 + (f*x)/2)^2 + 1)^4)